package com.example.mybatisplus.demo.controller;

import com.example.mybatisplus.demo.service.impl.StudentServiceImpl;
import com.example.mybatisplus.demo.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {
    @Autowired
    private StudentServiceImpl studentService;
    @RequestMapping("/students")
    @ResponseBody
    public List<Student> getStudent(){
        return studentService.getAllStudent(1,10);
    }
}
